package com.r2dbc.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.ToString;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.Transient;
import org.springframework.data.domain.Persistable;
import org.springframework.data.relational.core.mapping.Table;

/*
 *@Description<p></p>
 *@Author gz
 *@CreateTime 2025/8/12 20:52
 *@CopyRight @2021-2025 卓望信息技术（北京）公司
 */
@Data
@ToString
@AllArgsConstructor
@Table("role")
public class Role implements Persistable {
    @Id
    private Long id;

    private String name;

    @Transient
    @Override
    public boolean isNew() {
        return id == null;
    }
}
